package com.sky.mapper;

import com.sky.anno.AutoFill;
import com.sky.dto.SetmealDTO;
import com.sky.entity.SetmealDish;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Mapper
public interface SetmealDishMapper {
    /**
     * 批量插入套餐的菜品
     * @param setmealDishes
     * @return
     */

    int addSetmealDish(List<SetmealDish> setmealDishes);

    /**
     * 批量删除删除套餐表表中与套餐的菜品
     * @param list
     * @return
     */
    int deleteBySetmealId(List<String>  list);

    /**
     * 根据套餐id查询套餐表中的菜品
     * @param id
     * @return
     */
    @Select("select * from setmeal_dish where setmeal_id = #{id}")
    List<SetmealDish> getBySetmealId(Long id);
}
